import request from '@/config/request.js';

export const queryProductNameList = (params) => request.post('/feishu/queryProductNameList', params);

// 获取领料列表数据
export const queryPickingList = (params) => request.post('/feishu/queryPickingList', params);
// 获取一个合同号的领料数据情况
export const findPickedQtyByContractNo = (params) => request.get(`/feishu/findPickedQtyByContractNo`, params);

// 获取领料详情数据
export const queryPickingDetailByContractCodeV2 = (params) => request.post('/feishu/queryPickingDetailByContractCodeV2', params);

// 获取合同列表的某一个产品规格数据
export const queryPickingListInfoByContractCode = (params) => request.post('/feishu/queryPickingListInfoByContractCode', params);


// 获取入库列表数据
export const queryInstockingList = (params) => request.post('/feishu/queryInstockingList', params);
// 获取入库详情数据
export const queryInstockDetailByContractCodeV2 = (params) => request.post('/feishu/queryInstockDetailByContractCodeV2', params);


// 提交领料详情数据V4 使用最新版本
export const submitPickingV4 = (params) => request.post('/feishu/submitPickingV4', params);

// 提交补料详情
export const submitFeedMtrl = (params) => request.post('/feishu/submitFeedMtrl', params);

// 提交退料详情
export const submitReturnMtrl = (params) => request.post('/feishu/submitReturnMtrl', params);

// 提交工单入库单
export const submitInstock = (params) => request.post('/feishu/submitInstock', params);


// 实时查询即时库存数据
export const getRealTimeStockList = (params) => request.post('/feishuStock/getRealTimeStockList', params);

// 实时仓库查询，分页
export const getRealTimeStockListByPage = (params) => request.post('/feishuStock/getRealTimeStockListByPage', params);

// 实时查询仓库信息，不包括物料编码
export const getRealTimeStockWithoutBomList = (params) => request.post('/feishuStock/getRealTimeStockWithoutBomList', params);

// 分页查询
export const getStockBaseList = (params) => request.post('/feishuStock/getStockBaseList', params);


// 获取领料列表数据
export const queryPickedHistory = (params) => request.post('/feishu/queryPickedHistory', params);
// 获取领料明细数据
export const queryPickedDetail = (params) => request.post('/feishu/queryPickedDetail', params);

// 重推失败的领料单
export const resendPicked = (params) => request.post('/feishu/resendPicked', params);

export const planBigPanGroupByContractList = (params) => request.post(`/feishu/task/planBigPanGroupByContractList`, params);
export const queryTotalNumber = (params) => request.post(`/feishu/task/queryTotalNumber`, params);


// 历史记录：根据批次获取领料明细数据
export const queryPickedDetailByBatchNo = (params) => request.post('/feishu/queryPickedDetailByBatchNo', params);
// 退、补审核操作
export const applyByStatus = (params) => request.post('/feishu/applyByStatus', params);

// 查找审批流数据
export const queryCurrentFlowList = (params) => request.post('/feishu/queryCurrentFlowList', params);

// 查找被我审批的数据
export const queryApplyFlowList = (params) => request.post('/feishu/queryApplyFlowList', params);
// 查找我发起的审批数据
export const queryMineFlowList = (params) => request.post('/feishu/queryMineFlowList', params);

// 其他合同在途领料单管理
// 单个物料被其他合同使用的分页查询
export const getNoneSelfOnwayPickingListByPage = (params) => request.post('/feishuPicking/getNoneSelfOnwayPickingListByPage', params);
// 非当前合同号的同等物料在途数量
export const getAllNoneSelfOnwayPicking = (params) => request.post('/feishuPicking/getAllNoneSelfOnwayPicking', params);
